package com.zhongen.oa.mapper;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.yulichang.base.MPJBaseMapper;
import com.zhongen.oa.entity.ProjectBasicInfoEntity;
import com.zhongen.oa.entity.ProjectMainTaskEntity;
import com.zhongen.oa.entity.ProjectTaskBugEntity;
import com.zhongen.oa.entity.vo.ProjectBasicInfoNumVo;
import com.zhongen.oa.entity.vo.ProjectBasicInfoVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.HashSet;
import java.util.List;

@Mapper
public interface ProjectBasicInfoMapper extends MPJBaseMapper<ProjectBasicInfoEntity> {

	IPage<ProjectBasicInfoVo> queryProjectInfoList(Page page,
			@Param("entity") ProjectBasicInfoEntity projectBasicInfoEntity, @Param("deptIds") HashSet<Long> deptIds);

	List<ProjectBasicInfoNumVo> getProjectBasicInfoNumApp(@Param("entity") ProjectBasicInfoEntity projectBasicInfo,
			@Param("deptIds") HashSet<Long> deptIds);

	ProjectBasicInfoVo getProjectInfoById(@Param("id") Long id);

	List<ProjectBasicInfoVo> queryProjectInfoAll(@Param("entity") ProjectBasicInfoEntity projectBasicInfo,
			@Param("deptIds") HashSet<Long> deptIds);

	List<JSONObject> getFileList(@Param("projectIds") List<Long> projectIds,
			@Param("contractIds") List<Long> contractIds);

	ProjectBasicInfoEntity getProjectNumberByInstanceId(String id);

	List<ProjectMainTaskEntity> getTaskAll(@Param("id") Long id, @Param("ids") List<Long> ids);

	List<ProjectTaskBugEntity> getBugList(@Param("mainTaskId") List<Long> mainTaskId,
			@Param("subTaskId") List<Long> subTaskId);

}
